<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>17.JQ表单选择器</title>
		<script type="text/javascript" src="../js/jquery-1.8.3.js" ></script>
		<script>
			$(function(){
				$("#btn1").click(function(){
					$(":input").css("background-color","red");
				});
				
				$("#btn2").click(function(){
					$(":text").css("background-color","red");
				});
			});
		</script>
	</head>
	<body>
		<input type="button" id="btn1" value="选择所有input元素($(&quot;:input&quot;))" />
		<input type="button" id="btn2" value="选择文本框($(&quot;:text&quot;))" />
		<br/>
		<form>
			<input type="text" value="type=text"/><br />
			<input type="checkbox" value="type=checkbox"/><br />
			<input type="radio" value="type=radio"/><br />
			<input type="image" value="type=image"/><br />
			<input type="file" value="type=file"/><br />
			<input type="submit" value="type=submit"/>
			<input type="reset" value="type=reset"/><br />
			<input type="password" value="type=password"/><br />
			<input type="button" value="type=button"/><br />
			
			<br /><br />
			<font>上面全是input,下面是原生</font>
			
			<br /><br />
			<select>
				<option>select</option>
			</select>
			<br />
			<textarea>textarea</textarea>
			<br />
			<button>button</button>
		</form>
	</body>
</html>